package net.pm.core.entities.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import net.pm.core.entities.PMCommandEntity;


/**
 * The persistent class for the city database table.
 * 
 */
@Entity
@Table(name="city")
public class City extends PMCommandEntity<City> {
	/**
	 * 
	 */
	private static final long serialVersionUID = -9014835364221841966L;
	private Integer id;
	private String code;
	private String name;
	private String provinceCode;

    public City() {
    }

    
    
	public City(Integer id) {
		super();
		this.id = id;
	}



	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}


	@Column(nullable=false, length=6)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	@Column(nullable=false, length=20)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}


	@Column(nullable=false, length=6)
	public String getProvinceCode() {
		return this.provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	@Override
	public int compareTo(City o) {
		// TODO Auto-generated method stub
		return 0;
	}
	
}